<template>
  <div
    id="mapContainer"
    class="basic-table-demo1"
    :key="new Date().getTime()"
  ></div>
</template>

<script setup lang="ts">
import { initMap } from "./index.js";
import { getLayerManagerState } from "../mapbox_core/layer/layerManagerState";
import { activateMouseEvents } from "../mapbox_core/realtimeTrack copy/index";
import { onMounted } from "vue";
let map = null;
onMounted(() => {
  if (map) {
    // removeAllLayers(getLayerManagerState(map));
  }
  map = initMap("mapContainer");
  const layerManagerState = getLayerManagerState(map);
  console.log(layerManagerState);
  activateMouseEvents(map)
  
});
</script>

<style lang="scss" scoped>
.basic-table-demo1 {
  position: relative;
  width: 100%;
  height: 100%;
  .layerCme {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 99;
  }
  h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--wmc-text-color);
  }
}
:deep(.mapboxgl-ctrl-logo) {
  display: none !important;
}
</style>
